package entities;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;


@Entity
@Table(name="books")
@NamedQueries({
	@NamedQuery(name="getToateCartile", query="SELECT e FROM Carte e"),
	@NamedQuery(name="getCarteByID", query="SELECT e FROM Carte e WHERE e.id = :idParam"),
	@NamedQuery(name="dupaTitlu", query="SELECT c FROM Carte c WHERE c.nume=:name_Param"),
	@NamedQuery(name="dupaAutor", query="SELECT c FROM Carte c WHERE c.autor=:autor_Param"),
	@NamedQuery(name="dupaStatus", query="SELECT c FROM Carte c WHERE c.status=:status_Param")
})
public class Carte implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Id
	private int id;
	
	private String nume;
	
	private String autor;
	
	private String anul;
	
	private String status;
	
	private String data_retur;
	
	private String imprumutata_de;
	
	public Carte(){
		super();
	}
	
	public Carte(int id, String nume, String autor, String anul, String status, String data_retur, String imprumutata_de){
		this.id = id;
		this.nume = nume;
		this.autor = autor;
		this.anul = anul;
		this.status = status;
		this.data_retur = data_retur;
		this.imprumutata_de = imprumutata_de;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getNume() {
		return nume;
	}

	public void setNume(String nume) {
		this.nume = nume;
	}

	public String getAutor() {
		return autor;
	}

	public void setAutor(String autor) {
		this.autor = autor;
	}

	public String getAnul() {
		return anul;
	}

	public void setAnul(String anul) {
		this.anul = anul;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getData_retur() {
		return data_retur;
	}

	public void setData_retur(String data_retur) {
		this.data_retur = data_retur;
	}

	public String getImprumutata_de() {
		return imprumutata_de;
	}

	public void setImprumutata_de(String imprumutata_de) {
		this.imprumutata_de = imprumutata_de;
	}

}
